/*
 * DailyMission.h
 *
 *  Created on: 2014. 4. 9.
 *      Author: mega
 */

#ifndef DAILYMISSION_H_
#define DAILYMISSION_H_

namespace ProjectZ {
class User;
} /*ProjectZ*/

namespace ProjectZ { namespace NLogic {

class DailyMission
{
public:
	enum MissionType {
		__NONE__	= -1,

		SPECIAL_MISSION = 0,

		MISSION1	= 1,
		MISSION2,
		MISSION3,
		MISSION4,
		MISSION5,
		MISSION6,
		MISSION7,

		__MAX__,
	};

public:
	struct Data
	{
		int missionType;
		int completeCount;
		int isReward;		// 보상 수령 여부 (0:미완료, 1:받기가능, 2:받기완료)

		Data() : missionType(0), completeCount(0), isReward(0) {}

		void Clear()
		{
			missionType		= 0;
			completeCount	= 0;
			isReward		= 0;
		}
	};

public:
	DailyMission(User * pUser);
	virtual ~DailyMission();

	void		Initialize();
	void		Finalize();

	Data *		GetData(MissionType eType);

	void		MissionComplete(MissionType eType);
	bool		IsAllMissionComplete();
	void		CheckMissionInitialize();

public:
	typedef std::vector<Data *> DAILYMISSIONVECTOR;

private:
	User * _pUser;
	DAILYMISSIONVECTOR _clsVector;
};

} /* namespace NLogic */ } /* namespace ProjectZ */

#endif /* DAILYMISSION_H_ */
